<!DOCTYPE html>
<html lang="en" xmlns:th="http://thymeleaf.org">
<head>
    <meta charset="UTF-8">
</head>
<body>
<div th:replace="/common/header"></div>
<div id="Content">
    <div id="BackLink">
        <a th:href="${'/category/viewCategory?categoryId='}+${product.category}">
            Return to <th:block th:text="${product.category}" />
        </a></div>

    <div id="Catalog">

        <style type="text/css">

            table {
                width: 700px;
                padding: 0;
                margin: 0;
            }

            caption {
                padding: 0 0 5px 0;
                width: 700px;
                font: italic 16px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
                text-align: right;
            }

            th {
                font: bold 16px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
                color: #4f6b72;
                border-right: 1px solid #C1DAD7;
                border-bottom: 1px solid #C1DAD7;
                border-top: 1px solid #C1DAD7;
                letter-spacing: 2px;
                text-transform: uppercase;
                text-align: left;
                padding: 6px 6px 6px 12px;
                background: #d5eaca no-repeat;
            }

            td {
                border-right: 1px solid #C1DAD7;
                border-bottom: 1px solid #C1DAD7;
                background: #fff;
                font-size:16px;
                padding: 6px 6px 6px 12px;
                color: #4f6b72;
            }
        </style>

        <h2><th:block th:text="${product.name}" /></h2>

        <table>
            <tr>
                <th>Item ID</th>
                <th>Product ID</th>
                <th>Description</th>
                <th>List Price</th>
                <th>&nbsp;</th>
            </tr>
                <tr th:each="item : ${itemList}">
                    <td><a th:href="${'/category/viewItem?itemId='}+${item.itemId}"><th:block th:text="${item.itemId}" /></a> </td>
                    <td th:text="${item.productId}"></td>
                    <td th:text="|${item.attribute1},${product.name}|"></td>
                    <td th:text="${item.listPrice}"></td>
                    <td><a th:href="${'/cart/AddItemtoCart?workingItemId='}+${item.itemId}" class="Button">
                        Add to Cart
                    </a></td>
                </tr>
            <tr>
                <td>
                </td>
            </tr>
        </table>

    </div>
</div>
<div th:replace="/common/footer"></div>
</body>
</html>